Skip to content

fix(ci): pin COLUMNS=80 to stabilize visual snapshot tests - #1441

Merged
namastex888 merged 1 commit into
devfrom
fix/ci-pin-columns-for-visual-snapshots
Apr 28, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/ci-pin-columns-for-visual-snapshots

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

Evidence

Failing test pattern across all 3 PRs:

visual: AgentPicker > empty directory          (fail)
visual: AgentPicker > populated                (fail)
visual: AgentPicker > filtered                 (fail)
visual: TeamCreate > step 1 (name)             (fail)
visual: ContextMenu > running agent menu       (fail)

Snapshot diff signature (same shape across all 5 tests):

-           ╭──── 80 chars ────╮          (expected: padded narrow)
+ ╭──── 100+ chars ────╮                  (actual: unpadded wide)

Local repro on dev (bun test test/visual/tui-snapshot.test.tsx):

17 pass, 0 fail, 17 snapshots, 18 expect() calls

Local passes, CI fails — pure terminal-width drift.

Why workflow-level env

Both unit-tests > Visual regression (line 83-86) and pg-tests > Test (serial) (which runs the full suite, including test/visual/) need the same value. Workflow-level env: is the single source of truth and future-proofs new visual tests.

Test plan

test/visual/tui-snapshot.test.tsx renders OpenTUI components without
forcing an explicit terminal width — OpenTUI auto-detects from $COLUMNS.
Local developer terminals default to 80 cols (where the committed
snapshots were originally captured); Blacksmith CI runners default to
~100+ cols, producing wider card borders that break every visual
snapshot diff.

Diagnosis: identical failure pattern across 3 unrelated open PRs
(#1432 channel-envelope, #1435 partition-default-drain, #1440
tui-overlay-narrow-pane) — all fail the same 5 visual snapshot tests
plus the same Quality Gate umbrella job. Code in those PRs is fine;
the env was inconsistent between snapshot capture and CI render.

Snapshot diff signature:
  -           ╭──── 80 chars ────╮          (left-padded, expected)
  + ╭──── 100+ chars ────╮                  (unpadded, actual)

Fix: pin COLUMNS=80 at the workflow level so every step in every job
(unit-tests > Visual regression, pg-tests > Test) inherits the same
render width as the snapshots.

After this lands, the 3 open PRs should rerun CI green via rebase or
re-push trigger. Future visual tests inherit the pin without per-step
plumbing.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Apr 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: fb0365ee-8f20-41f0-8e5d-4f8e57082d4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-pin-columns-for-visual-snapshots

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@namastex888
namastex888 merged commit 68b0ac3 into dev Apr 28, 2026
11 checks passed
namastex888 added a commit that referenced this pull request Apr 28, 2026
After #1441 pinned COLUMNS=80 at the workflow level, the existing
SystemStats snapshots (5 frames: low/mid/high/critical CPU + Nav cold
start) drifted by 1 trailing space per line — the prior captures came
from a terminal that emitted slightly different right-padding for the
"genie vX.Y.Z" header row.

Regenerated locally with `COLUMNS=80 bun test test/visual/ -u` to match
the CI render exactly. Diff is purely whitespace; visible chars and
colour spans unchanged.

Unblocks PR #1432 channel-envelope CI. Same baseline now applies to
any future visual test addition in this PR or downstream.
namastex888 added a commit that referenced this pull request Apr 28, 2026
After #1441 pinned COLUMNS=80 at the workflow level, the existing
SystemStats snapshots (5 frames: low/mid/high/critical CPU + Nav cold
start) drifted by 1 trailing space per line — the prior captures came
from a terminal that emitted slightly different right-padding for the
"genie vX.Y.Z" header row.

Regenerated locally with `COLUMNS=80 bun test test/visual/ -u` to match
the CI render exactly. Diff is purely whitespace; visible chars and
colour spans unchanged.

Unblocks PR #1432 channel-envelope CI. Same baseline now applies to
any future visual test addition in this PR or downstream.
@automagik-genie
automagik-genie deleted the fix/ci-pin-columns-for-visual-snapshots branch September 25, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant